#pragma once

#include <stdlib.h>
#include <windows.h>

typedef void(*OnPostFn)(void* context, int width, int height, int ydir, int format, int type, unsigned char* pixels);
extern "C" {

	__declspec(dllexport) int initLibrary(void);
	__declspec(dllexport) int FrameBuffer_setupSubWindow(void *id, int w, int h, float zrot);
	__declspec(dllexport) int FrameBuffer_removeSubWindow();
	__declspec(dllexport) int initOpenGLRenderer(int width, int height);
	__declspec(dllexport) int setPipename(char *);
	__declspec(dllexport) bool destroyOpenGLSubwindow(void);
	__declspec(dllexport) int stopOpenGLRenderer(void);
	__declspec(dllexport) void setCallbackRotation(void(*fn)(float));
	__declspec(dllexport) void repaintOpenGLDisplay();
	__declspec(dllexport) void setOpenGLDisplayRotation(float zRot);
	__declspec(dllexport) void callbackRotation(float zRot);
	__declspec(dllexport) unsigned char*  Screenshot();

}